home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 9
/
The PC-SIG Library on CD ROM - Ninth Edition.iso
/
101_200
/
DISK0163
/
DISK0163.ZIP
/
TRANSLIT.DOC
< prev
next >
Wrap
Text File
|
1983-08-22
|
3KB
|
87 lines
TRANSLIT (Character Translation Filter)
Command
--------------------------------------------------
Purpose: This is a filter that reads a file from
the standard input device, translates
specified characters into others, and
writes the translated text to the
standard output device.
Format: TRANSLIT from to
Type: Internal External
***
Remarks: The parameters 'from' and 'to' are strings
of characters, a given character in 'from'
will be translated into the corresponding
character in the to string.
To specify a range of characters
to be converted you may type char-char
(see examples and note below).
To specify non-printing characters such
as <cr>,<lf> or <tab> one may use the
following escape sequences (the leading
\ tells translit that the following is
to be interpreted as a special character).
\f form feed
\b back space
\n line-feed
\t tab
\s space
\\ back slash character itself
\! exclamation mark
\r carriage return
\0 ASCII null
To specify that all characters not in
the given set of from characters are to
be translated to a given character,
precede the list of characters with an
exclamation mark (!)( see example below).
Examples: A>TRANSLIT a-z A-Z <translit.doc
Will display this file, with all the
lower case letters in it converted to
upper case.Or,
A>TRANSLIT \s\t\n \n <translit.doc
>transl.wrd
will produce a list of all the words in
this file, listed one per line, in the
file transl.wrd.
A>TRANSLIT !\n\r\sA-Za-z0-9 \s <translit.
doc >transl.npu
Will make the file transl.npu containing
this document with all the punctuation
marks removed.
Note: 1. When specifying ranges of characters
both characters must be upper-case
letters, lower-case letters or
digits. The first character must also
be the predecessor of the second, in
lexical order. Thus a-s, 2-5 or W-Y are
legal, but A-z , 9-1 and x-e are not
legal.
2. If the to string is shoreter than
the from string, then the excess
characters in from will all be translated
to the last character of to.
Written by Michael Hanson